package cn.lanqiao.demo.controller;


import cn.lanqiao.demo.entity.Check;
import cn.lanqiao.demo.service.CheckService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/check")
public class CheckController {

    private CheckService checkService;

    @Autowired
    public void setCheckService(CheckService checkService) {
        this.checkService = checkService;
    }

    //向前端页面发送已接种人数
    @GetMapping("/total")
    public int getInoculatedAll() {
        return checkService.getInoculatedAll();
    }

    @GetMapping("/list")
    public Check list(){
        return checkService.list();
    }
}
